#coding=utf-8
import unittest

discov=unittest.defaultTestLoader.discover('F:\PyWorkSpace\TestAdd\TestCase',pattern='Test*.py')

def createSuit():
    testunit=unittest.TestSuite()
    for testcase in discov:
        print testcase
        testunit.addTest(testcase)
    return testunit
if __name__=='__main__':
    testnames=createSuit()
    filename="F:\PyWorkSpace\TestAdd\Report\Report.txt"
    fo=open(filename,'wb')
    runner=unittest.TextTestRunner(fo)
    # runner.run(discov)
    runner.run(testnames)